<?php
include 'partials/header.php';
require __DIR__ . '/notes/notes.php';


$note = [
    'id' => '',
    'name' => "",
    'value' => ""
];

$errors = [
    'name' => "",
    'value' => ""
];
$isValid = true;

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $note = array_merge($note, $_POST);
        $note = createnote($_POST);

        header("Location: index.php");
}

?>

<?php include '_form.php' ?>